home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 July / CHIP Turkiye Temmuz 2000.iso / prog / share / 20 / 20.exe / COMPIL_E.TXT < prev    next >
Text File  |  2000-04-06  |  22KB  |  636 lines

  1.   ########################################################
  2.   #                                                      #
  3.   # Introduction To Fractal Explorer Formulae Compilator #
  4.   #                     version 2.01                     #
  5.   #                                                      #
  6.   ########################################################
  7.  
  8.   Written by Sirotinsky Arthur and Olga Fedorenko
  9.   WWW     http://skyscraper.fortunecity.com/binary/34/index.html
  10.   EMail   art@gor.kv.energy.gov.ua
  11.  
  12.   Sorry for any spelling mistakes, our natural language is Russian.
  13.   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  14.   0     Changes.
  15.   1     Acknowledgements
  16.   2     Limitations
  17.   3     Introduction
  18.         3.1   What is the formula compilator ?
  19.         3.2   Formula Files
  20.   4     Formula's Anatomy
  21.         4.1   Formula it's a program
  22.         4.2   Formula it's a Delphi/Pascal program
  23.         4.3   Requirements
  24.         4.4   Simple project
  25.         4.5   Temporarly variable declaration
  26.         4.6   Complicated project
  27.         4.7   The complex functions
  28.         4.8   Stels compilation
  29.   5     Version 2.01 of the compilator
  30.         5.1   List of the functions and procedures
  31.         5.2   Another changes in version 2.01
  32.         5.3   Examples of the new formulaes
  33.  
  34.  
  35.   0     Changes
  36.   =============
  37.   Version 2.01 of the Formulae Compilator has little but very
  38.   important changes. First of all, now, you do not needed to 
  39.   write the difficult expressions for the formula realization.
  40.   We have added support for many operations and functions of 
  41.   the complex values. Also, we added four complex variables for
  42.   using in your functions. In part number [5] we describe the 
  43.   new possibilities. Please, read it before using Formulae 
  44.   Compilator.
  45.  
  46.  
  47.   1     Acknowledgements
  48.   ======================
  49.   Bradley Beacham for
  50.                    FRMTUTOR.TXT
  51.                AN INTRODUCTION TO
  52.            THE FRACTINT FORMULA PARSER
  53.  
  54.   Borland/Inprise/ Corp. for Delphi Command Line compiler
  55.  
  56.  
  57.   2     Limitations
  58.   =================
  59.   Our formulae compilator is not parser. It's part of the program, 
  60.   which calculated one step of the iteration process. It can't read
  61.   formulae directly, since complex type is not standard type for
  62.   Delphi.
  63.  
  64.  
  65.   3     Introduction
  66.   ==================
  67.  
  68.         3.1   What is the formula compilator ?
  69.         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  70.   It is a new part of the fractal-generating program, Fractal Explorer
  71.   (version 1.13 and above).
  72.  
  73.   FE has many different types of the fractal's formulaes itself, the
  74.   formula compilator allows you to add new fractals, without having to
  75.   change the program.  These formulaes are stored in Fractal Spot files,
  76.   and may be viewed and edited by the user.
  77.  
  78.         3.2   Formula Files
  79.         ~~~~~~~~~~~~~~~~~~~
  80.   New user formula are not saved to simple file. Formula will be stored
  81.   into Fractal Spot file (*.frs), which contains internal data for 
  82.   generating image. Therefore, FE requires one FRS file for building
  83.   one image
  84.   (formula already implemented into).
  85.  
  86.  
  87.   4     Formula's Anatomy
  88.   =======================
  89.   Why compilator ?
  90.   Compiled programs always work more quickly than interpretator.
  91.  
  92.         4.1   Formula it's a program
  93.         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  94.   Fractal Explorer uses formula's text for building Dynamic Link Libraries
  95.   (DLL), after that loaded new dll (for interest - look to system TEMP
  96.   directory - strings "SET TMP=" or "SET TEMP=" in your autoexec.bat).
  97.   After formula changing (or exit FE) DLL will be unloaded from memory
  98.   and deleted with the project source.
  99.  
  100.         4.2   Formula it's a Delphi/Pascal program
  101.         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  102.   To compile a new formula, FE will create the Delphi project file (*.DPR)
  103.   in the temporary directory and execute Borland Delphi Command Line
  104.   compiler to generate the DLL file.
  105.  
  106.   Since we are using the Delphi for writing Fractal Explorer, we are using
  107.   Delphi for DLL compilation.
  108.  
  109.         4.3   Requirements
  110.         ~~~~~~~~~~~~~~~~~~
  111.   Using formula compilator in FE required many files. 
  112.   They are listed below:
  113.       dcc32    exe
  114.       math     dcu
  115.       sharemem dcu
  116.       sysinit  dcu
  117.       system   dcu
  118.       sysutils dcu
  119.       windows  dcu
  120.       rlink32  dll
  121.       sysutils inc
  122.       make     pif
  123.   All files must exist in the Fractal Explorer directory.
  124.   FE will be check for the presence of these files before compiling the new formula.
  125.   If you lost one or more files - download full archive from:
  126.          http://skyscraper.fortunecity.com/binary/34/compiler.zip
  127.   and unzip it into FE's folder.
  128.  
  129.         4.4   Simple project
  130.         ~~~~~~~~~~~~~~~~~~~~
  131.   Complex number are two-part number. First part - real part, and second
  132.   part - imaginary part. Notation of complex numbers are:
  133.      Z = X + jY,
  134.   where "j" - imaginary part sign.
  135.   Fractal Explorer using such format of complex number.
  136.  
  137.   For illustrating of formula take Mandelbroth Set:
  138.   Traditional Mandelbrot-set:
  139.       z_new = z * z  +  c
  140.   You write in edit box:
  141.       ---------Cut----Cut----------
  142.             var k: Extended;
  143.           Begin
  144.             k:=(x+y) * (x-y) + cr;
  145.             y:=2 * x * y + ci;
  146.             x:=k;
  147.           End;
  148.       ---------Cut----Cut----------
  149.   "x" is real part of "z" complex number, áand "y" - imag part.
  150.   "cr" is real part of "c" complex number, áand "ci" - imag part.
  151.  
  152.   "z" value received in "x" and "y" variables. New value of "z" will be
  153.   returned in these variables.
  154.  
  155.   Variable "k" using for store new "x" value before calculating new
  156.   "y" value.
  157.  
  158.   Press "Go" button. FE makes Delphi project for this formula:
  159.       ---------Cut----Cut----------
  160.       library proba;
  161.       Uses ShareMem, SysUtils, Math, Complex;
  162.       Procedure Formula(var x, y, cr, ci: Extended;
  163.                             p1r, p1i, p2r, p2i, p3r, p3i: Extended;
  164.                         var cA1, cA2, cA3, cA4: TComplex); export;
  165.         var k: Extended;
  166.       Begin
  167.         k:=(x+y) * (x-y) + cr;
  168.         y:=2 * x * y + ci;
  169.         x:=k;
  170.       End;
  171.       exports
  172.       Formula index 1 name 'Formula';
  173.       BEGIN
  174.       END.
  175.       ---------Cut----Cut---------
  176.  
  177.   For Delphi and Pascal programmers these codes are not difficult. For
  178.   other people, it will be interesting only in Procedure Formula declaration:
  179.     Procedure Formula(var x, y, cr, ci: Extended;
  180.                           p1r, p1i, p2r, p2i, p3r, p3i: Extended;
  181.                       var cA1, cA2, cA3, cA4: TComplex); export;
  182.  
  183.   Variables
  184.     x and y  - mathematical coordinates of current point on every cycle;
  185.     cr,ci    - real and imag party Julie parameter (C),
  186.                another sence - Z0 value;
  187.     p1r..p3i - real and imag party fractal parameters P1, P2 and P3.
  188.  
  189.   You can modify values of cr and ci. For example:
  190.       ---------Cut----Cut---------
  191.         var c1,c2: Extended;
  192.       Begin
  193.         c1:=x; c2:=y;
  194.         k:=(x+y) * (x-y) + cr;
  195.         y:=2 * x * y + ci;
  196.         x:=k;
  197.         cr:=c1; ci:=c2;
  198.       End;
  199.       ---------Cut----Cut---------
  200.  
  201.   Values, received in p1r, p1i, p2r, p2i, p3r, p3i parameters are real and
  202.   imag parts of P1, P2 and P3 parameters of the fractal (see "Select formula"
  203.   window). They are constant for your formula.
  204.  
  205.   That's all folks !
  206.  
  207.   NOTE: do not write calculation cycle - Fractal Explorer makes it itself !!!
  208.  
  209.  
  210.         4.5   Temporary variable declaration
  211.         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  212.   Separate your formula to small parts and use temporary variables
  213.   (remember, that it requires "var" section);
  214.  
  215.   Syntax for a temporary variable declaration:
  216.      var name1, name2, name3: [type]
  217.   Type may be "Single", "Double" or "Extended".
  218.  
  219.   Difference:
  220.   type     | range                       | significant digits | size in bytes
  221.   ---------+-----------------------------+--------------------+--------------
  222.   Single   | 1.5x10^_45 .. 3.4x10^38     | 7_8                | 4
  223.   Double   | 5.0x10^_324 .. 1.7x10^308   | 15_16              | 8
  224.   Extended | 3.6x10^_4951 .. 1.1x10^4932 | 19_20              | 10
  225.  
  226.   "Single" works quickly, but precision is smallest;
  227.   "Double" works slow, but precision is good;
  228.   "Extended" works very slowly, but precision is very good.
  229.  
  230.  
  231.   Examles:
  232.       var tmp1,tmp2: Double;
  233.     Begin
  234.       <formula>
  235.     End;
  236.  
  237.       var h1x,h1y: Double;
  238.           h2x,h2y: Double;
  239.     Begin
  240.       <formula>
  241.     End;
  242.  
  243.       var h1x,h1y: Double;
  244.           h2x,h2y: Double;
  245.           f: Extended;
  246.     Begin
  247.       <formula>
  248.     End;
  249.  
  250.  
  251.         4.6   Difficult project
  252.         ~~~~~~~~~~~~~~~~~~~~~~~
  253.   Mandel/Talis formula:
  254.   z_new = z*z + c;
  255.   c_new = c*c/(c+P1) + z_new;
  256.  
  257.   Write:
  258.       ---------Cut----Cut---------
  259.         var h1x,h1y, h2x,h2y, f: Extended;  // -temporary variables
  260.       Begin
  261.         h1x:=(x+y)*(x-y)+cr;                // -calculating z_new
  262.         y  := x*y*2     +ci;                //  z_new = z*z + c
  263.         x  := h1x;
  264.  
  265.         h1x:= (cr+ci)*(cr-ci);              // -h1 = c*c
  266.         h1y:=  cr*ci * 2;
  267.  
  268.         h2x:= cr+p1r;                       // -h2 = c+P1
  269.         h2y:= ci+p1i;
  270.  
  271.         f  := h2x*h2x+h2y*h2y+1E-25;        // -c_new=h1/h2 + z_new
  272.         cr :=(h2x*h1x+h2y*h1y)/f+x;
  273.         ci :=(h2x*h1y-h2y*h1x)/f+y;
  274.       End;
  275.       ---------Cut----Cut---------
  276.   You calculate new values for "x" (real part) and "y" (imag part) of
  277.   complex variable "z".
  278.   Also, you change cr and ci values - real and imag parts of "c".
  279.   Next step will use z_new and c_new.
  280.  
  281.         4.7   The complex functions
  282.         ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  283.   You can insert many complex functions into your formulae, but you may find it
  284.   necessary to describe them, like that
  285.   (remember, that Z = X + jY  and  C = CR + jCI):
  286.     z*z:
  287.        X_new := (X-Y)*(X+Y);
  288.        Y_new := 2 * X*Y;
  289.  
  290.     z*c:
  291.        X_new := X*CR - Y*CI;
  292.        Y_new := X*CI + Y*CR;
  293.  
  294.     z*z*z:
  295.        X_new := X*(X*X-3*Y*Y);         // -this is optimized formula
  296.        Y_new := Y*(3*X*X-Y*Y);
  297.  
  298.     z*z*z*z:
  299.        tmp_r := (X-Y)*(X+Y);
  300.        tmp_i := 2 * X*Y;
  301.        X_new := (tmp_r - tmp_i) * (tmp_r + tmp_i);
  302.        Y_new := 2 * tmp_r * tmp_i;
  303.  
  304.     1/z:
  305.        tmp   := X*X + Y*Y + 1E-10;     // -without 1E-10 may by divizion by zero
  306.        X_new := X / tmp;
  307.        Y_new := Y / tmp;
  308.  
  309.     1/(z*z):
  310.        tmp   := X*X + Y*Y;
  311.        tmp   := tmp * tmp + 1E-10;     // -without 1E-10 may by divizion by zero
  312.        X_new := (X*X - Y*Y) / tmp;
  313.        Y_new := (2*X * Y  ) / tmp;
  314.  
  315.     Sqrt(z):
  316.        tmp   := Sqrt(X*X + Y*Y);
  317.        X_new := Sqrt(Abs((X + tmp)/2));
  318.        Y_new := Sqrt(Abs((tmp - X)/2));
  319.  
  320.     Exp(z):     // e^z
  321.        tmp   := Exp(X);
  322.        X_new := tmp * Cos(Y);
  323.        Y_new := tmp * Sin(Y);
  324.  
  325.     Exp(1/z):
  326.        tmp   := X*X + Y*Y + 1E-10;         // see above
  327.        s1    := X/tmp;
  328.        s2    :=-Y/tmp;
  329.        tmp   := Exp(s1);
  330.        X_new := tmp * Cos(s2);
  331.        Y_new := tmp * Sin(s2);
  332.  
  333.     Ln(z):
  334.        X_new :=Log2(X*X+Y*Y)/2.7182818285;
  335.        Y_new :=ArcTan2(Y,X);
  336.  
  337.     z^c:
  338.        h1x   :=Log2(X*X+Y*Y)/2.7182818285;       // -Ln(z)
  339.        h1y   :=ArcTan2(Y,X);
  340.        h2x   :=h1x*CR - h1y*CI;                  // -Ln(z)*c
  341.        h2y   :=h1y*CR + h1x*CI;
  342.        f     :=Exp(h2x);                         // -Exp(Ln(z)*c)
  343.        X_new :=f*Cos(h2y);
  344.        Y_new :=f*Sin(h2y);
  345.  
  346.     Sin(z):
  347.        tmp   := Exp(Y)/2;             // -optimized formula (!)
  348.        tmp2  := 0.25/tmp;
  349.        X_new := Sin(X) * (tmp+tmp2);
  350.        Y_new := Cos(X) * (tmp-tmp2);
  351.  
  352.     Cos(z):
  353.        X_new := Cos(X)*Cosh(Y);      // -not optimized formula
  354.        Y_new :=-Sin(X)*Sinh(Y);
  355.  
  356.     Tan(z):                          // -tangens
  357.        X_new := Sin(2*X)/(Cos(2*X)+Cosh(2*Y);
  358.        Y_new := Sin(2*Y)/(Cos(2*X)+Cosh(2*Y);
  359.  
  360.     Sinh(z):                         // -hiperbolic sinus
  361.        X_new := Sinh(X)*Cos(Y);      // -not optimized formula
  362.        Y_new := Cosh(X)*Sin(Y);
  363.  
  364.     Cosh(z):                         // -hiperbolic cosinus
  365.        X_new := Cosh(X)*Cos(Y);      // -not optimized formula
  366.        Y_new := Sinh(X)*Sin(Y);
  367.  
  368.   You must change X, Y, CR and CI variables to those, which is required by
  369.   your formula.
  370.  
  371.         4.8   Stels compilation
  372.         ~~~~~~~~~~~~~~~~~~~~~~~
  373.   Make.pif contains preferences to run Borland Delphi Command Line
  374.   compiler. It references to file MAKE.BAT, but make.bat will be recreated
  375.   by Fractal Explorer.
  376.  
  377.   By default, we specially leave window for completed compilation process:
  378.   look for errors and warnings about optimization of your formula.
  379.  
  380.   You can make any changes in MAKE.PIF (please, keep MAKE.BAT as command
  381.   line). And you can modify property for automatic closing window after
  382.   process termination.
  383.  
  384.  
  385.  
  386.   5     Version 2.01 of the compilator
  387.   ====================================
  388.  
  389.         5.1   List of the functions and procedures
  390.         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  391.   First of all, we want to describe the type of the complex values.
  392.   This type is declared in Complex.pas as listed below:
  393.        Type
  394.          TComplex = record
  395.            real: Extended;
  396.            imag: Extended;
  397.          end;
  398.  
  399.   All of the functions listed below will use this type for their
  400.   operations. It's a very important part of the new version Formulae
  401.   Compilator.
  402.  
  403.   List of the functions and procedures
  404.   ####################################
  405.  
  406.      I. Function  MakeComplex(real, imag: Extended): TComplex;
  407.                   This function makes TComplex value from the two values,
  408.                   which describes the real and imag part of the complex
  409.                   value. Use this function to translate the input values
  410.                   (x,y, cr,ci and p1r..p3i) to the complex type. After
  411.                   this translation you can use result in other functions
  412.                   and procedures.
  413.                   Also, you can use this function to make TComplex value
  414.                   from constant, for example:
  415.                    tmp:=MakeComplex(3,0) - make real numeric "3" as TComplex.
  416.  
  417.     II. Procedure SetResult(var x,y: Extended; const complex: TComplex);
  418.                   This procedure makes final results accessible for
  419.                   Formulae Compilator. As described in [4.4] part of this,
  420.                   result values must be returned in the "X" and "Y" variables.
  421.                   You can use two operations for it:
  422.                       x:=Z.real;
  423.                       y:=Z.imag;
  424.                   but now you can use the SetResult procedure for this.
  425.  
  426.  
  427.  | Below are listed functions and procedures for mathematical operations.
  428.  | Every operation has two releases. First - as procedure with no result
  429.  | returning and second - as function, which returns the result of the
  430.  | operation as TComplex value. Any procedure keeps the result complex
  431.  | value in the variable, which passed as the first parameter.
  432.  
  433.  
  434.    III. Sum of the two complex:
  435.         Procedure CAddV(var Cmp1: TComplex; const Cmp2: TComplex);
  436.                   Cmp1 := Cmp1 + Cmp2;
  437.                   Result value will be returned in the "Cmp1" variable.
  438.  
  439.         Function  CAdd (const Cmp1, Cmp2: TComplex): TComplex;
  440.                   Cmp3 := Cmp1 + Cmp2;
  441.                   Result value will be returned as a result of the function.
  442.  
  443.     IV. Subtraction of the two complex:
  444.         Procedure CSubV(var Cmp1: TComplex; const Cmp2: TComplex);
  445.                   Cmp1 := Cmp1 - Cmp2;
  446.  
  447.         Function  CSub (const Cmp1, Cmp2: TComplex): TComplex;
  448.                   Cmp3 := Cmp1 - Cmp2;
  449.  
  450.      V. Multiplication of the two complex:
  451.         Procedure CMulV(var Cmp1: TComplex; const Cmp2: TComplex);
  452.                   Cmp1 := Cmp1 * Cmp2;
  453.  
  454.         Function  CMul (const Cmp1, Cmp2: TComplex): TComplex;
  455.                   Cmp3 := Cmp1 * Cmp2;
  456.  
  457.     VI. Division of the two complex:
  458.         Procedure CDivV(var Cmp1: TComplex; const Cmp2: TComplex);
  459.                   Cmp1 := Cmp1 / Cmp2;
  460.  
  461.         Function  CDiv (const Cmp1, Cmp2: TComplex): TComplex;
  462.                   Cmp3 := Cmp1 / Cmp2;
  463.  
  464.  
  465.  | Next set of the functions realizes the optimized functions
  466.  
  467.    VII. Square of the complex:
  468.         Procedure CSqrV(var Cmp1: TComplex);
  469.                   Cmp1 := Cmp1^2;
  470.  
  471.         Function  CSqr (Cmp1: TComplex): TComplex;
  472.                   Cmp2 := Cmp1^2;
  473.  
  474.   VIII. Third power of the complex:
  475.         Procedure CTripleV(var Cmp1: TComplex);
  476.                   Cmp1 := Cmp1^3;
  477.  
  478.         Function  CTriple (Cmp1: TComplex): TComplex;
  479.                   Cmp2 := Cmp1^3;
  480.  
  481.     IX. Fourth power of the complex:
  482.         Procedure CFourV(var Cmp1: TComplex);
  483.                   Cmp1 := Cmp1^4;
  484.  
  485.         Function  CFour (Cmp1: TComplex): TComplex;
  486.                   Cmp2 := Cmp1^4;
  487.  
  488.  
  489.      X. Flip of the complex:
  490.         Procedure CFlipV(var Cmp1: TComplex);
  491.                   Cmp1.real:=Cmp1.imag
  492.                   Cmp1.imag:=Cmp1.real
  493.  
  494.         Function  CFlip (Cmp1: TComplex): TComplex;
  495.                   Cmp2.real:=Cmp1.imag
  496.                   Cmp2.imag:=Cmp1.real
  497.  
  498.     XI. Reversing of the complex:
  499.         Procedure CRevV (var Cmp1: TComplex);
  500.                   Cmp1 := 1 / Cmp1;
  501.  
  502.         Function  CRev  (const Cmp1: TComplex): TComplex;
  503.                   Cmp1 := 1 / Cmp1;
  504.  
  505.    XII. Another reversing:
  506.         Procedure CRev2V(var Cmp1: TComplex; Cmp2: TComplex);
  507.                   Cmp1 := 1 / (Cmp1 - Cmp2);
  508.  
  509.         Function  CRev2 (Cmp1,Cmp2: TComplex): TComplex;
  510.                   Cmp3 := 1 / (Cmp1 - Cmp2);
  511.  
  512.  
  513.   XIII. Squre root of the complex:
  514.         Procedure CSqrtV(var Cmp1: TComplex);
  515.                   Cmp1 := Sqrt(Cmp1);
  516.  
  517.         Function  CSqrt (Cmp1: TComplex): TComplex;
  518.                   Cmp2 := Sqrt(Cmp1);
  519.  
  520.    XIV. Exponent of the complex:
  521.         Procedure CExpV (var Cmp1: TComplex);
  522.                   Cmp1 := Exp(Cmp1);
  523.  
  524.         Function  CExp  (Cmp1: TComplex): TComplex;
  525.                   Cmp2 := Exp(Cmp1);
  526.  
  527.    XIV. Logorithm of the complex:
  528.         Procedure CLnV  (var Cmp1: TComplex);
  529.                   Cmp1 := Ln(Cmp1);
  530.  
  531.         Function  CLn   (Cmp1: TComplex): TComplex;
  532.                   Cmp2 := Ln(Cmp1);
  533.  
  534.     XV. Raise complex to complex power:
  535.         Procedure CPowerV(var Cmp1: TComplex; Cmp2: TComplex);
  536.                   Cmp1 := Cmp1^Cmp2;
  537.  
  538.         Function  CPower (Cmp1,Cmp2: TComplex): TComplex;
  539.                   Cmp3 := Cmp1^Cmp2;
  540.  
  541.  
  542.  | Trigonometric functions
  543.  
  544.    XVI. Sinus of the complex:
  545.         Procedure CSinV (var Cmp1: TComplex);
  546.                   Cmp1 := Sin(Cmp1);
  547.  
  548.         Function  CSin  (Cmp1: TComplex): TComplex;
  549.                   Cmp2 := Sin(Cmp1);
  550.  
  551.  
  552.   XVII. Cosinus of the complex:
  553.         Procedure CCosV (var Cmp1: TComplex);
  554.                   Cmp1 := Cos(Cmp1);
  555.  
  556.         Function  CCos  (Cmp1: TComplex): TComplex;
  557.                   Cmp2 := Cos(Cmp1);
  558.  
  559.  
  560.  XVIII. Tangens of the complex:
  561.         Procedure CTanV (var Cmp1: TComplex);
  562.                   Cmp1 := Tan(Cmp1);
  563.  
  564.         Function  CTan  (Cmp1: TComplex): TComplex;
  565.                   Cmp2 := Tan(Cmp1);
  566.  
  567.    XIX. Hyperbolic sinus of the complex:
  568.         Procedure CSinhV(var Cmp1: TComplex);
  569.                   Cmp1:=Sinh(Cmp1)
  570.  
  571.         Function  CSinh (Cmp1: TComplex): TComplex;
  572.                   Cmp2:=Sinh(Cmp1)
  573.  
  574.     XX. Hyperbolic cosinus of the complex:
  575.         Procedure CConhV(var Cmp1: TComplex);
  576.                   Cmp1:=Cosh(Cmp1)
  577.  
  578.         Function  CCosh (Cmp1: TComplex): TComplex;
  579.                   Cmp2:=Cosh(Cmp1)
  580.  
  581.  
  582.         5.2   Another changes in version 2.01
  583.         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  584.   [+] added four complex variables for using in your formulaes.
  585.       new declaration of the main procedure listed below:
  586.           Procedure Formula(var x, y, cr, ci: Extended;
  587.                                 p1r, p1i, p2r, p2i, p3r, p3i: Extended;
  588.                             var cA1, cA2, cA3, cA4: TComplex); export;
  589.       This variables has initialized into zero values, i.e. cA1.real = 0
  590.       and cA1.imag = 0 and so on. During calculation of the one point
  591.       this variables will keep user value.
  592.  
  593.   [!] now N/ewton/-Set Method will work properly;
  594.  
  595.  
  596.         5.3   Examples of the new formulaes
  597.         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  598.   I. Mandelbrot furmula:
  599.        var Z,Z0: TComplex;
  600.      Begin
  601.        Z :=MakeComplex(x,y);          // make complex from [x] and [y] variables
  602.        Z0:=MakeComplex(cr,ci);        // make complex from [cr] and [ci] variables
  603.  
  604.        Z :=CAdd( CSqr(Z), Z0);        // calculate the Mandel
  605.  
  606.        SetResult(x,y, Z);             // store result to [x] and [y] variables
  607.      End;
  608.  
  609.  
  610.  II. Mandel/Talis formula:
  611.      z_new = z*z + c;
  612.      c_new = c*c/(c+P1) + z_new;
  613.  
  614.      Write:
  615.       ---------Cut----Cut---------
  616.        var Z,Z0,P1: TComplex;
  617.      Begin
  618.        Z :=MakeComplex(x,y);          // make complex from [x] and [y] variables
  619.        Z0:=MakeComplex(cr,ci);        // make complex from [cr] and [ci] variables
  620.        P1:=MakeComplex(p1r,p1i);      // make complex from [p1r] and [p1i] variables
  621.  
  622.        Z :=CAdd( CSqr(Z), Z0);        // calculates Z_NEW
  623.  
  624.        Z0:=CDiv(CSqr(Z0), CAdd(Z0,P1))   // Z' = C*C/(C+P1)
  625.        Z0:=CAdd(Z0,Z);                   // C_NEW  = Z'+Z_NEW
  626.        SetResult(cr,ci, Z0);          // store C_NEW to [cr] and [ci] variables
  627.        SetResult(x,y, Z);             // store Z_NEW to [x] and [y] variables
  628.      End;
  629.  
  630.  
  631.  
  632.  
  633. <c> 1999, 2000
  634. Sirotinsky Arthur and Olga Fedorenko
  635. Kiev, Ukraine.
  636.